1. Field of the Invention
The present invention relates to a peripheral connect interface (PCI) addressing scheme, and more particularly, to an auto detection and correction logic for a PCI bus addressing scheme.
2. Description of Related Art
A PCI bus interfaces a master to a number of slave peripheral devices through the PCI bus. Each of the peripheral devices has an associated base address register, typically 32 bits in length. The PCI convention specifies that if the peripheral device has a certain amount of memory that is addressable, the master loads an address signal, of is a particular format, into the base address register.
FIG. 1 is a table of specified base address signals according to the amount of memory available under PCI convention. For example, if all 4 gigabytes (32 bits) of memory are available, the base address register is loaded with all 32 bits each with a value of "0" or "0 . . . 0." If there are two gigabytes of memory available, the first or left most bit is denoted "1" followed by all 31 bits of "0"s. Thus, if two gigabytes of memory are available, the base address register is loaded with "1 0 0 . . . 0." If only one gigabyte of memory is available, then the two left most bits are denoted "1" and followed by all "0"s, thereby loading the base address register with "1 1 0 0 . . . 0."
Sometimes the base address register may be loaded with an illegal address. One type of illegal address is an out of range address or an address of the wrong size. For example, an address 16 bits in length is an illegal address. Prior art to correct and illegal address have included U.S. Pat. Nos. 5,555,250; 5,649,162; 5,649,129; 5,337,264; and 5,287,321.
Another type of illegal address is an address of the correct size, but illegal in that the address violates PCI convention. For example, an address such as "1 1 0 1 0 0 . . . 0" is an illegal address because a "1" is to the right of a "0". According to PCI convention, a "0" may not be the left adjacent bit of a "1".
There are a number of methods for detecting an illegal address. For example, an out of range address may be detected with a detection scheme that uses combinatorial logic. However, currently there is no apparatus or method for detecting an illegal addresses, that violates the PCI convention, as described, above, and corrects it.